﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Pay.Data.Mapping {
  
    public partial class EntrepotMap
        : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<Entrepot> {
        public EntrepotMap() {
            // table
            ToTable("mc_Entrepot", "dbo");

            // keys
            HasKey(t => t.Id);

            // Properties
            Property(t => t.Id)
                .HasColumnName("Id")
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity)
                .IsRequired();
            Property(t => t.Address)
                .HasColumnName("Address")
                .HasMaxLength(20)
                .IsRequired();
            Property(t => t.Contact)
                .HasColumnName("Contact")
                .HasMaxLength(100)
                .IsOptional();
            Property(t => t.ContactPhone)
                .HasColumnName("ContactPhone")
                .HasMaxLength(100)
                .IsOptional();
            Property(t => t.EntrepotName)
                .HasColumnName("EntrepotName")
                .HasMaxLength(50)
                .IsRequired();
            // Relationships
        }
    }
}
